<template>
	<view class="home">
		<u-gap height="20" bg-color="#f5f5f5"></u-gap>
		<view class="list uni-flex uni-column">
			<view class="wrap-item">
				<view class="lis uni-flex uni-column" >
					<view class="uni-flex uni-column" v-for="(item, index) in list" :key="index">
						<view class="swiper-item item_title uni-flex list_item">
							<view class="userlistmsg" :class="index%2?'cor':'non'">
								<view>{{ item.clinicId }}</view>
								<view>{{ item.clinicName }}</view>
								<view>{{ item.doctorName }}</view>
								<view v-if="item.startStatus=='0'">正常</view>
								<view v-if="item.startStatus=='1'">关闭</view>
								<view v-if="item.startStatus=='2'">维修</view>
								<view><button size="mini" @click="navTo('/pages/sys/workbench/forwardAdd')">预约</button></view>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>
 
<script>
export default {
		data() {
			return {
				list: [],
			}
		},
	mounted() {
	},
	onLoad() {
		this.$u.api.user.forwardList().then(res=>{
			if (res.code == '200'){
				this.list=res.data;
				
			}else{
				this.$u.toast(res.message);
			}
		});
	},
	methods: {
		navTo(url) {
			uni.navigateTo({
				url: url
			});
		},
	}
};
</script>
 
<style>
	page{
		width: 100%;
	}
	.home,.list {
		width: 750upx;
		padding-top: 30upx;
	}
	.userlistmsg{
		width: 100%;
		display: flex;
		justify-content: space-around;
	}
	.cor{
		background: #FFF5F3 ;
	}
</style>